using System;
using System.Runtime.CompilerServices;

namespace MetaView.Core;

/// <summary>
/// 全局环境设置
/// </summary>
public static class GlobalEnvironment
{
    /// <summary>
    /// 动态构建类型，默认使用IL
    /// </summary>
    public static DynamicBuilderType DynamicBuilderType { get; set; } = DynamicBuilderType.IL;

    /// <summary>
    /// 是否支持动态代码
    /// </summary>
    public static bool IsDynamicCodeSupported => RuntimeFeature.IsDynamicCodeSupported;

    /// <summary>
    /// 获取应用程序的基础目录。
    /// </summary>
    public static string BaseDirectory => AppContext.BaseDirectory;
}